<script type="text/javascript">
$(function(){
	//$("#branchNoByEmpReceive").val("10000002");
	//$("#empNoByEmpReceive").val("10000022");
	$.post("inventorymanagement/getUserAndBanch",function(json){
		var activeUser = json.activeUser;
		var userNo=activeUser.userNo;
		var branchNo=activeUser.branchNo;
		$("input[name='empNoByEmpReceive']").val(userNo);
		$("input[name='branchNoByEmpReceive']").val(branchNo);	
})
	$("#receiveCardClassify").change(function(){
		var classFyVal = $("select[name='receiveCardClassify']").val();
		console.log("classFyVal==>"+classFyVal);
		if(classFyVal=='1'){
			$("#requestAmountByEmpReceive").removeAttr("disabled");
			$("#requestAmountByEmpReceive").val("");
			$("#taskNoByEmpReceive").val("不可编辑");
			$("#applyCompanyByEmpReceive").val("不可编辑");
			$("#taskNoByEmpReceive").attr("disabled","disabled");
			$("#applyCompanyByEmpReceive").attr("disabled","disabled");
		}else if(classFyVal == '2'){
			$("#requestAmountByEmpReceive").val("不可编辑");
			$("#requestAmountByEmpReceive").attr("disabled","disabled");
			$("#taskNoByEmpReceive").removeAttr("disabled");
			$("#applyCompanyByEmpReceive").removeAttr("disabled");
			$("#taskNoByEmpReceive").val("");
			$("#applyCompanyByEmpReceive").val("");
		}
	});
	
	$("#queryCardByBlankAppAndBatchApp").click(function(){
		var classFyVal = $("select[name='receiveCardClassify']").val();
		if(classFyVal=='0'){
			alertMsg.warn("请确认是否选择了卡类型！")	
			return false;
		}else if(classFyVal=='1'){
			var requestAmount = $("#requestAmountByEmpReceive").val();
			if(!requestAmount){
				alertMsg.warn("请输入请求数量！");
				return false;
			}
		}
	});
//	$.post("inventorymanagement/getCardDeliveryReg",getCardDeliveryReg,"json");
});

function onblus(){ 
	var am =$("input[name='amount']").val();
	var amo =$("input[name='amount1']").val();
	//alert('出库数量不能超过库存数量！！！'+(amo-am));
	if((amo-am)>0){
		alert('出库数量不能超过库存数量！！！');
		$("input[name='amount1']").val("");
	}
}
</script>
<div class="pageContent">
	<form method="post" action="inventorymanagement/queryCardByBlankAppAndBatchApp" class="pageForm required-validate" onsubmit="return validateCallback(this,queryCardByBlankAppAndBatchAppInfo);">
		<div class="pageFormContent" >		
			<p>
				<label>卡片分类：</label>
				<select  id ="receiveCardClassify" name="receiveCardClassify" >	
				<option value="0">请选择</option>
				<option value="1">记名空白预制卡</option>
				<option value="2">不记名卡</option>
				<option value="3">记名批量制卡</option>
				</select>		
			</P>
			<p>
				<label>请求数量：</label>
				<input  id="requestAmountByEmpReceive" name="requestAmountByEmpReceive" type="text" size="30" />
			</P>
			<p>
				<label>任务编号：</label>
				<input  id="taskNoByEmpReceive" name="taskNoByEmpReceive" type="text" size="30" />			
			</P>
			<p>
				<label>申请单位：</label>
				<input  id="applyCompanyByEmpReceive" name="applyCompanyByEmpReceive" type="text" size="30"/>			
			</P>
			<p>
				<label>网点编号：</label>
				<input  id="branchNoByEmpReceive" name="branchNoByEmpReceive" type="text" size="30" readonly="readonly" />			
			</P>
			<p>
				<label>员工编号：</label>
				<input  id="empNoByEmpReceive" name="empNoByEmpReceive" type="text" size="30" readonly="readonly" />			
			</P> 
			<div class="formBar">
			<ul> 
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button id="queryCardByBlankAppAndBatchApp" type="submit">查询</button></div></div>
				</li>
			</ul>
		   </div>				
		</div>
	</form>
</div>
<form method="post" action="inventorymanagement/blankAndFinishCardReceivingRegister" class="pageForm required-validate" onsubmit="return validateCallback(this,printViewPageAjaxDone);" >

		<!-- <input id="bankName" name="bankName" type="hidden" value="">
		<input id="companyName" name="companyName" type="hidden" value=""> -->

	 <div class="pageContent" >
	 <div id="empreceive">
		<table class="table" width="660" layoutH="320">
			<thead>
				<tr>
					<th width="5%" align="center"><input type="checkbox" id="cardReceiv" name="cardReceivingtaskedByTotal" group="cardReceivingtasked" class="checkboxCtrl"></th>
					<th width="8%" align="center">序号</th>
					<th width="20%" align="center">市民卡号</th>
					<th width="20%" align="center">任务号</th>
					<th width="15%" align="center">申请单位</th>
				</tr>
			</thead>
			<tbody id="blankAppAndBatchAppCardInfo">
			</tbody>
		</table>
		</div>
	 <div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select id="numPerPageByIM" name="numPerPage" onchange="paging()">
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span id="totalCountByEmpReceiving" ></span>
		</div>
		<!-- <div class="pagination" targetType="navTab" totalCount="200" numPerPage="20" pageNumShown="10" currentPage="1"></div> -->
			<div id="paginationByEmpReceiving" class="pagination1"  ></div>
	</div>
	<div class="pageFormContent" >
		<div class="formBar">	
			<ul>
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button id="subTask" onclick="return validateCheckBoxByBlank()" type="submit">入库</button></div></div>
				</li>
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button   type="submit">关闭</button></div></div>
				</li>
			</ul>			
		</div>
	</div>
</div>
</form>
